/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.designpatternspart2.proxyPattern;

import java.util.Date;

/**
 *
 * @author Dwayne
 */
public class Proxy {
    
    SlowThing slowThing;
    
    public Proxy(){
        System.out.println("Creating proxy at " + new Date());
    }
    
    public String sayHello()
    {       
        if(slowThing == null)
        {
            slowThing = new SlowThing();            
        }         
        return "SlowThing";
    }
}
